import { http } from '@/utils/http/axios';

/**
 * @description: 职位代号列表
 */
export function positionCodePage(params) {
    return http.request({
        url: '/moss-cloud-base/base/positionCode/positionCodePage',
        method: 'POST',
        data: params,
    });
}

/**
 * @description: 新增职位代号
 */
export function savePositionCode(params) {
    return http.request({
        url: '/moss-cloud-base/base/positionCode/savePositionCode',
        method: 'POST',
        data: params,
    }, {
        isTransformResponse: false,
    });
}

/**
 * @description: 更新职位代号
 */
export function updatePositionCode(params) {
    return http.request({
        url: '/moss-cloud-base/base/positionCode/updatePositionCode',
        method: 'POST',
        data: params,
    }, {
        isTransformResponse: false,
    });
}

/**
 * @description: 删除职位代号
 */
export function removePositionCode(params) {
    return http.request({
        url: '/moss-cloud-base/base/positionCode/removePositionCode',
        method: 'POST',
        data: params,
    }, {
        isTransformResponse: false,
    });
}

/**
 * @description: 职位列表
 */
export function positionPage(params) {
    return http.request({
        url: '/moss-cloud-base/base/position/positionPage',
        method: 'POST',
        data: params,
    });
}

/**
 * @description: 职位列表子集数据
 */
export function childrenList(params) {
    return http.request({
        url: '/moss-cloud-base/base/position/childrenList',
        method: 'POST',
        data: params,
    });
}

/**
 * @description: 新增职位
 */
export function savePosition(params) {
    return http.request({
        url: '/moss-cloud-base/base/position/savePosition',
        method: 'POST',
        data: params,
    }, {
        isTransformResponse: false,
    });
}

/**
 * @description: 更新职位
 */
export function updatePosition(params) {
    return http.request({
        url: '/moss-cloud-base/base/position/updatePosition',
        method: 'POST',
        data: params,
    }, {
        isTransformResponse: false,
    });
}

/**
 * @description: 删除职位
 */
export function removePosition(params) {
    return http.request({
        url: '/moss-cloud-base/base/position/removePosition',
        method: 'POST',
        data: params,
    }, {
        isTransformResponse: false,
    });
}
/**
 * @description: 职位详情
 */
export function position(params) {
    return http.request({
        url: '/moss-cloud-base/base/position/position',
        method: 'POST',
        data: params,
    });
}

/**
 * @description: 用户职位列表查询
 */
export function userPositionPage(params) {
    return http.request({
        url: '/moss-cloud-base/base/sysUserPosition/userPositionPage',
        method: 'POST',
        data: params,
    });
}

/**
 * @description: 用户转岗
 */
export function transfer(params) {
    return http.request({
        url: '/moss-cloud-base/base/sysUserPosition/transfer',
        method: 'POST',
        data: params,
    }, {
        isTransformResponse: false,
    });
}

/**
 * @description: 用户岗位
 */
export function userPositions(params) {
    return http.request({
        url: '/moss-cloud-base/base/sysUserPosition/userPositions',
        method: 'POST',
        data: params,
    });
}

/**
 * @description: 职位树查询
 */
export function positionTree(params) {
    return http.request({
        url: '/moss-cloud-base/base/position/positionTree',
        method: 'POST',
        data: params,
    });
}